package com.bestv.search.management.command;

import com.bestv.search.common.dataSource.DataSourceKey;
import com.bestv.search.common.model.KeySubject;
import com.bestv.search.common.model.SysUser;
import org.json.JSONException;
import org.json.JSONObject;

import java.text.ParseException;
import java.util.Map;

public interface IKeySubjectCommand {
    public String findPType(SysUser user, Map<String, String[]> map, DataSourceKey dsKey) throws JSONException;

    public String delete(SysUser user, Map<String, String[]> map, DataSourceKey dsKey);

    public String find(SysUser user, Map<String, String[]> map, DataSourceKey dsKey) throws JSONException;

    public String get(SysUser user, Map<String, String[]> map, DataSourceKey dsKey);

    public String save(SysUser user, Map<String, String[]> map, DataSourceKey dsKey) throws ParseException;

    public String findKeyFrequent(SysUser user, Map<String, String[]> map, DataSourceKey dsKey) throws JSONException;

    public String searchResultByKeysInPtype(SysUser user, Map<String, String[]> map, DataSourceKey dsKey)
            throws JSONException;

    public String searchResultByKeysOutPtype(SysUser user, Map<String, String[]> map, DataSourceKey dsKey)
            throws JSONException;

    public String findProAndKeyNumInPTypes(SysUser user, Map<String, String[]> map, DataSourceKey dsKey)
            throws JSONException;

    public String findProAndTagNumInPTypes(SysUser user, Map<String, String[]> map, DataSourceKey dsKey)
            throws JSONException;

    public String findEachKeyAndNumInPType(SysUser user, Map<String, String[]> map, DataSourceKey dsKey)
            throws JSONException;

    public String findEachTagAndNumInPType(SysUser user, Map<String, String[]> map, DataSourceKey dsKey)
            throws JSONException;

    public String findCrossKeyword(SysUser user, Map<String, String[]> map, DataSourceKey dsKey) throws JSONException;

    public String findCrossKeywordDetail(SysUser user, Map<String, String[]> map, DataSourceKey dsKey)
            throws JSONException;

    public JSONObject keySubjectToJSONObject(KeySubject ks) throws JSONException;
}
